// var mongoose = require("mongoose");
// var mongoosePaginate = require("mongoose-paginate")
//
// var schema = new mongoose.Schema({
//     title:String,
//     content:String,
//     author:String,
//     from:{type:String,default:"知乎"},
//     date:{ type:Date,default:Date.now}
// });
// schema.plugin(mongoosePaginate);
// var News = mongoose.model(News,schema,"news");
//
// module.exports = News;

var mongoose = require("mongoose");
var mongoosePaginate = require("mongoose-paginate");

var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;

var schema = new mongoose.Schema({
    title:String,
    content:String,
    author:String,
    comments:Number,
    from:{type:String,default:"知乎"},
    date:{ type:Date,default:Date.now},
    linkid:{type:String,default:"59e756f2b568341bb80fc265"},
    //默认为nodejs
    //59e6f687f8c5ff13b0b7f6d3          --NBA
    //59e7525fb568341bb80fc257          --CBA
    //59e75267b568341bb80fc258          --WorldCup
    //59e75615b568341bb80fc25d          --lol
    //59e75267b568341bb80fc258          --worldCup
});
schema.plugin(mongoosePaginate);
var News = mongoose.model("News",schema,"news");

module.exports = News;